<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>登录 - IT资产管理平台</title>
  <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
  <style>
    /* 登录页独立样式 */
    .login-container {
      width: 300px;
      margin: 120px auto;
      padding: 20px;
      background-color: white;
      border: 1px solid #bdc3c7;
      border-radius: 4px;
    }
    .login-container h1 {
      text-align: center;
      margin-bottom: 20px;
    }
    .form-group {
      margin-bottom: 15px;
    }
    .form-group label {
      display: block;
      margin-bottom: 5px;
    }
    .form-group input {
      width: 100%;
      padding: 8px;
      box-sizing: border-box;
      border: 1px solid #bdc3c7;
      border-radius: 4px;
    }
    .form-group button {
      width: 100%;
      padding: 10px;
      background-color: #34495e;
      border: none;
      color: white;
      cursor: pointer;
      border-radius: 4px;
    }
    .form-group button:hover {
      background-color: #2c3e50;
    }
    .flashes {
      color: red;
      list-style: none;
      padding: 0;
      text-align: center;
    }
  </style>
</head>
<body>
  <div class="login-container">
    <h1>IT资产管理平台</h1>
    <form method="post">
      <div class="form-group">
        <label for="username">用户名</label>
        <input type="text" name="username" id="username" required>
      </div>
      <div class="form-group">
        <label for="password">密码</label>
        <input type="password" name="password" id="password" required>
      </div>
      <div class="form-group">
        <button type="submit">登录</button>
      </div>
    </form>
    {% with messages = get_flashed_messages() %}
      {% if messages %}
      <ul class="flashes">
        {% for message in messages %}
        <li>{{ message }}</li>
        {% endfor %}
      </ul>
      {% endif %}
    {% endwith %}
  </div>
</body>
</html>
